package com.qdxwx.models.course;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 
 * @description 播放记录
 */
public class CourseStudyHistory implements Serializable {

    private static final long serialVersionUID = 5636113126397399250L;

    private Long id;
    private Long userId;//播放次数
    private Integer courseId;//播放次数
    private Integer nodeId;//播放次数
    private Integer playerCount;//播放次数
    private String courseName;//课程名称
    private String nodeName;//节点名称
    private String databack;//playerCount小于20时记录,备注观看的时间，叠加
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;//更新时间

    private String userName;//用户名
    private String userMobile;//用户手机
    private String userAvatar;//用户头像

    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private LocalDateTime beginCreateTime;//查询 开始添加时间
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private LocalDateTime endCreateTime;//查询 结束添加时间

    public CourseStudyHistory() {
    }

    public Long getId() {
        return this.id;
    }

    public Long getUserId() {
        return this.userId;
    }

    public Integer getCourseId() {
        return this.courseId;
    }

    public Integer getNodeId() {
        return this.nodeId;
    }

    public Integer getPlayerCount() {
        return this.playerCount;
    }

    public String getCourseName() {
        return this.courseName;
    }

    public String getNodeName() {
        return this.nodeName;
    }

    public String getDataback() {
        return this.databack;
    }

    public LocalDateTime getUpdateTime() {
        return this.updateTime;
    }

    public String getUserName() {
        return this.userName;
    }

    public String getUserMobile() {
        return this.userMobile;
    }

    public String getUserAvatar() {
        return this.userAvatar;
    }

    public LocalDateTime getBeginCreateTime() {
        return this.beginCreateTime;
    }

    public LocalDateTime getEndCreateTime() {
        return this.endCreateTime;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public void setCourseId(Integer courseId) {
        this.courseId = courseId;
    }

    public void setNodeId(Integer nodeId) {
        this.nodeId = nodeId;
    }

    public void setPlayerCount(Integer playerCount) {
        this.playerCount = playerCount;
    }

    public void setCourseName(String courseName) {
        this.courseName = courseName;
    }

    public void setNodeName(String nodeName) {
        this.nodeName = nodeName;
    }

    public void setDataback(String databack) {
        this.databack = databack;
    }

    public void setUpdateTime(LocalDateTime updateTime) {
        this.updateTime = updateTime;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public void setUserMobile(String userMobile) {
        this.userMobile = userMobile;
    }

    public void setUserAvatar(String userAvatar) {
        this.userAvatar = userAvatar;
    }

    public void setBeginCreateTime(LocalDateTime beginCreateTime) {
        this.beginCreateTime = beginCreateTime;
    }

    public void setEndCreateTime(LocalDateTime endCreateTime) {
        this.endCreateTime = endCreateTime;
    }

    @Override
    public String toString() {
        return "CourseStudyHistory{" +
                "id=" + id +
                ", userId=" + userId +
                ", courseId=" + courseId +
                ", nodeId=" + nodeId +
                ", playerCount=" + playerCount +
                ", courseName='" + courseName + '\'' +
                ", nodeName='" + nodeName + '\'' +
                ", databack='" + databack + '\'' +
                ", updateTime=" + updateTime +
                ", userName='" + userName + '\'' +
                ", userMobile='" + userMobile + '\'' +
                ", userAvatar='" + userAvatar + '\'' +
                ", beginCreateTime=" + beginCreateTime +
                ", endCreateTime=" + endCreateTime +
                '}';
    }
}
